<!DOCTYPE html>
	<?php

include_once '../conn/mysql.php';
$res=sql('s','home',"*","");
$info=firstrow($res);
?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script src="http://libs.baidu.com/jquery/1.8.3/jquery.min.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>用户注册--<?=gv($info_copy,"title");?></title>
<link href="../tp/3/css/style.css" rel="stylesheet" type="text/css" />
<script language="javascript">
 function trim(str){ 
  return str.replace(/(^\s*)|(\s*$)/g, ""); 
  }
function pk(){
	if(trim(reg.addusername.value)==""){
		alert("登陆名不可为空，请填写!!!");
		reg.addusername.focus();
		return false;
	}
	
	if(trim(reg.addpassword.value)==""){
		alert("密码不可为空，请填写!!!");
		reg.addpassword.focus();
		return false;
	}
		if(reg.addpassword.value!=reg.password2.value){
		alert("两次密码不一致，请重新填写!!!");
		reg.addpassword.focus();
		return false;
	}
	if(trim(reg.nicheng.value)==""){
		alert("请填写个性昵称!!!");
		reg.nicheng.focus();
		return false;
	}
	if(trim(reg.qq.value)==""||trim(reg.tel.value)==""||trim(reg.email.value)==""){
		alert("请填写三种联系方式!!!");
		reg.qq.focus();
		return false;
	}
	if(trim(reg.zcalipay.value)==""){
		alert("请填写支付宝账号!!!");
		reg.zcalipay.focus();
		return false;
	}
	if(trim(reg.zcalipayname.value)==""){
		alert("请填写支付宝姓名!!!");
		reg.zcalipayname.focus();
		return false;
	}
}
</script>
</head>

<body>
<?php 
if (gv($info,"zhuce")==1) {
if (isset($_GET['invite'])) {
	$invite=$_GET['invite'];
	$res=sql("s", "user", "*", "where id=".$invite);
}else {
	$invite="admin";
	$res="admin";
}

?>
<!--head-->
<div class="head headzc">
 <img src="../tp/3/images/zhucetop.jpg" width="1899" height="109" />

     <div class="head_bottom_bg"></div>
</div>



<!--main-->
<div class="zc_mian">
     <div class="zc_top">
          <h2>微信主注册</h2>
          <p class="zc_top_a">有账号？请至 <a href="../index.html">首页登录！</a></p>
     </div>
     <div class="zc_con">
    <?php 


if ($res) {
	if ($res=="admin") {
		$admin="admin";
	}else{
	$info=firstrow($res);
	$admin=gv($info,"user");
	}
}else {
	echo "<script>alert('你输入的邀请地址有误！'); window.location.href='/'</script>";
	exit();
}
?>
<form class="comform" name="reg" action="../control.php?oper=reg" method="post">
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr class="bottom_boder">
                <td width="80" height="77">&nbsp;</td>
                <td width="114">*用户名： </td>
                <td width="290"><label for="addusername"></label>
                <input type="text" name="username" class="zc_textbox" /></td>
                <td width="43"><img src="../tp/3/images/wdxx_ico3.jpg" width="23" height="22" /></td>
                <td class="zc_con_font">5-16个字符，唯一性 不可修改！</td>
                </tr>
              <tr class="bottom_boder">
                <td height="77">&nbsp;</td>
                <td>*密码：</td>
                <td><input type="password" name="password" class="zc_textbox" /></td>
                <td><img src="../tp/3/images/wdxx_ico3.jpg" alt="" width="23" height="22" /></td>
                <td class="zc_con_font">6-20个字符，英文数字字符组合</td>
                </tr>
              <tr class="bottom_boder">
                <td height="77">&nbsp;</td>
                <td>*确认密码：</td>
                <td><input type="password" name="repass" class="zc_textbox" /></td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
                </tr>
              <tr class="bottom_boder">
                <td height="77">&nbsp;</td>
                <td>*QQ：</td>
                <td><input type="text" name="qq" class="zc_textbox" /></td>
                <td><img src="../tp/3/images/wdxx_ico3.jpg" alt="" width="23" height="22" /></td>
                <td class="zc_con_font">以下三种联系方式必填一种</td>
                </tr>
              <tr class="bottom_boder">
                <td height="77">&nbsp;</td>
                <td>*手机：</td>
                <td><input type="text" name="mobile" class="zc_textbox" /></td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
              </tr>
              <tr class="bottom_boder">
                <td height="77">&nbsp;</td>
                <td>*电子邮箱：</td>
                <td><input type="text" name="email" class="zc_textbox" /></td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
              </tr>
               <tr class="bottom_boder">
                <td height="77">&nbsp;</td>
                <td>*支付宝账号：</td>
                <td><input type="text" name="zhifubao" class="zc_textbox" /></td>
                <td><img src="../tp/3/images/wdxx_ico3.jpg" alt="" width="23" height="22" /></td>
                <td class="zc_con_font"> 不可更改！！ 用于 打款的支付宝账号</td>
              </tr>
               <tr class="bottom_boder">
                <td height="77">&nbsp;</td>
                <td>*支付宝姓名：</td>
                <td><input type="text" name="xingming" class="zc_textbox" /></td>
               <td><img src="../tp/3/images/wdxx_ico3.jpg" alt="" width="23" height="22" /></td>
                <td class="zc_con_font">不可更改！！ 真实姓名，用于打款核对</td>
              </tr>
              <tr class="bottom_boder">
                <td height="77">&nbsp;</td>
                <td>*邀请码：</td>
                <td>
                                <input type="text" name="applyma" class="zc_textbox" />
                                </td>
                <td><img src="../tp/3/images/wdxx_ico3.jpg" alt="" width="23" height="22" /></td>
                <td class="zc_con_font">无邀请码不能注册！</td>
              </tr>
              <meta charset="utf-8" />
              <tr>
                <td height="130"><input type="hidden" name="invite" readonly value="SMFN" /></td>
                <td>&nbsp;</td>
                <td colspan="3">
                 <input type="submit" name="hash" value=""  onClick="return pk()" style="border:none; width:351px; height:49px; background:url(tp/3/images/zc_ewqd.jpg)" />
                </td>
                </tr>
            </table>

       </form> 
     </div>
     <div style="clear:both;"></div>
</div>
 
<script type="text/javascript" src="../tp/3/js/jquery.min.js"></script>
<!--foot-->
<?php include("footer.html"); ?> 




<!--在线客服-->
<div class="fixedBox">
  <UL class="fixedBoxList">
    <LI style="display: block;" id="cartboxs" class="fixeBoxLi cart_bd">
      <P class="good_cart">0</P>
      <span class="fixeBoxSpan"></span> <strong>投诉意见</strong>
      <div class="cartBox">
        <div class="bjfff"></div>
        <div class="contactManager_box contactManager" id="cm_more">
  <!--[if IE 6]>
  <iframe src="about:blank" frameborder="0"></iframe>
  <![endif]-->
  <table>
    <tr class="contactManager_title">
      <td>
        <img src="../tp/3/images/icon_manager.jpg" alt="微分销" />
        <span>微分销</span>
      </td>
    </tr>

      <tr>
          <td>
             <a href="http://wpa.qq.com/msgrd?v=3&uin=270482281&site=qq&menu=yes" target="_blank" alt="点击这里给我发消息" title="点击这里给我发消息">
          <img src="../tp/3/images/icon_qq.jpg" alt="QQ" />
          <span>270482281</span>
        </a>
          </td>
      </tr>
    <tr>
      <td>
        <img src="../tp/3/images/icon_mobile.jpg" alt="手机号码" />
        <span>400-888-888</span>
      </td>
    </tr>
    
    <tr>
      <td>
      <a title="投诉建议邮箱" >
        <img src="../tp/3/images/icon_mail.jpg" alt="邮箱" />
        <span>270482281@qq.com</span>
      </a>
      </td>
    </tr>
  </table>

        </div>
      </div>
    </LI>
    <LI class="fixeBoxLi Home"> <A href="../index.html"> <span class="fixeBoxSpan"></span> <strong>返回首页</strong> </A> </LI>
    <LI class="fixeBoxLi BackToTop"> <span class="fixeBoxSpan"></span> <strong>返回顶部</strong> </LI>
  </UL>
</div>
<div style="display:none;">
</div>

<script src="../tp/3/js/lanrenzhijia.js"></script>
<script src="/static/js/j.js?0829"></script>
	<?php 
	}else{
		echo "<script> alert('请联系客服注册。');history.back();</script>";
	}
?>
</body>
</html>